package game.metalmax.packet.character {

	import flash.utils.ByteArray;
	
	import game.metalmax.packet.IPacket;

public class PAvatar implements IPacket{

	//方向
	public var direction:int;
	//动画名称
	public var animationName:String;
	//资源名称
	public var graphicID:String;
	//动画配置ID
	public var animationConfigID:String;

	public function write(out:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		out.writeInt(direction);
		out.writeUTF(animationName==null?"":animationName);
		out.writeUTF(graphicID==null?"":graphicID);
		out.writeUTF(animationConfigID==null?"":animationConfigID);
	}
	public function read(inn:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		direction = inn.readInt();
		animationName = inn.readUTF();
		graphicID = inn.readUTF();
		animationConfigID = inn.readUTF();
}
}
}